﻿using Microsoft.EntityFrameworkCore;
using MonentExam1013.Domain;

namespace MonentExam1013.infrastrunceture
{
    /// <summary>
    /// 数据库上下文
    /// </summary>
    public class MyDbContext : DbContext
    {
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="options"> 数据库上下文选项</param>
        public MyDbContext(DbContextOptions options) : base(options)
        {
        }
        /// <summary>
        /// 角色表
        /// </summary>
        public DbSet<Role> Roles { get; set; }
        /// <summary>
        /// 用户表
        /// </summary>
        public DbSet<User> Users { get; set; }
        /// <summary>
        /// 权限表
        /// </summary>
        public DbSet<Permission> Permissions { get; set; }
    } 
}
